package com.luoqiu.yygh.controller;

import com.luoqiu.yygh.common.result.Result;
import com.luoqiu.yygh.model.hosp.Hospital;
import com.luoqiu.yygh.service.HospitalService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.PostMapping;
import org.springframework.web.bind.annotation.RequestBody;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

@RestController
@RequestMapping(value = "/api/hosp")
public class ApiController {

    @Autowired
    private HospitalService hospitalService;

    @PostMapping(value = "save")
    public Result<Object> save(@RequestBody Hospital hospital) {
        return hospitalService.save(hospital);
    }
}
